﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DnPakExplorer.Controls {
	public partial class ImagePanel : UserControl {

		private Image mBackNineImage;

		[Browsable(true)]
		public Image BackNineImage {
			get { return mBackNineImage; }
			set {
				mBackNineImage = value;
				Invalidate();
			}
		}

		public ImagePanel() {
			InitializeComponent();
		}

		protected override void OnPaintBackground(PaintEventArgs e) {
			base.OnPaintBackground(e);
			if (BackNineImage != null && BackgroundImage==null) {
				Sprite.Draw(e.Graphics, BackNineImage, ClientRectangle, Padding);
			}
		}

	}
}
